<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table border ="1px">
		<thead >
			<th>商品ID</th>
			<th>商品编号</th>
			<th>商品名称</th>
			<th>商品价格</th>
			<th>商品库存</th>
			<th>商品生产商</th>
			<th>商品生产日期</th>
			<th>商品图片</th>
			<th>商品描述</th>
			<th>商品生产地</th>
			<th>类别ID</th>
			<th>修改</th>
			<th>删除</th>
		</thead>
		<c:forEach items= "${products.pros }" var="pro">
			<tr>
				<td>${pro.proID }</td>
				<td>${pro.proNum }</td>
				<td>${pro.proName }</td>
				<td>${pro.proPrice }</td>
				<td>${pro.proCount }</td>
				<td>${pro.proMannufacturer }</td>
				<td>${pro.proDate }</td>
				<td><img src="http://localhost:8080/test/${pro.proImg }" width="68px" height="55px"></td>
				<td>${pro.proDes}</td>
				<td>${pro.proPlace }</td>
				<td>${pro.cId }</td>
				<td><a href="UpdateServ?proID=${pro.proID }">修改</a></td>
				<td><a href="DelServ?proID=${pro.proID }">删除</a></td>
			</tr>
		</c:forEach>
	</table>
	<ul style="list-style:none">
		<c:if test="${products.pageNum!=1}">
				<li style="float:left">
					<a href="${pageContext.request.contextPath }/ShowProListServ2?pageNum=${products.pageNum-1} "style="text-decoration:none">上一页</a>
				</li>
		</c:if>
		<c:forEach begin="${products.startPage }" end="${products.endPage }" step="1" var="i">
			<li style="float:left;display: inline-block;width: 12px">
				<a href="${pageContext.request.contextPath }/ShowProListServ2?pageNum=${i }" style="text-decoration:none">${i }</a>
			</li>
		</c:forEach>
		<c:if test="${products.pageNum<products.allPages}">
			<li>
				<a href="${pageContext.request.contextPath }/ShowProListServ2?pageNum=${products.pageNum+1}"style="text-decoration:none">下一页</a>
			</li>
		</c:if>
	</ul>
</body>
</html>